//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { GroupHasPermission, GroupHasPermissionResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooGroupHasPermissionList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<GroupHasPermissionResponse>(`/uctoo/group_has_permission/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooGroupHasPermission = async (id: string) => {
  return requestClient.get<GroupHasPermission>(`/uctoo/group_has_permission/${id}`);
};

export const adductooGroupHasPermission = async (data: Partial<GroupHasPermission>) => {
  return requestClient.post<GroupHasPermission>('/uctoo/group_has_permission/add', data);
};

export const edituctooGroupHasPermission = async (data: Partial<GroupHasPermission>) => {
  return requestClient.post<GroupHasPermission>('/uctoo/group_has_permission/edit', data);
};

export const deleteuctooGroupHasPermission = async (id: string) => {
  return requestClient.post<any>('/uctoo/group_has_permission/del', { id });
};
